/**
 * cndatacom Inc.
 * Copyright (c) 2014-2014 All Rights Reserved.
 */   
package com.stam.controller;   

import java.util.Random;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.stam.dal.dataobject.StockUser;
import com.stam.service.StockUserService;

/**  
* 创建时间：2014年5月15日 上午12:15:19  
* 项目名称：stam  
* @author yangjuanying  
* @version 1.0   
* @since JDK 1.6.0_21  
* 文件名称：StockUserController.java  
* 类说明：  
*/
@Controller
public class StockUserController extends BaseController{
    
    @Autowired
    private StockUserService stockUserService;
    
    @RequestMapping("/user/list.htm")
    public String list(){
//        StockUser stockUser = new StockUser();
//        stockUser.setId(String.valueOf(new Random().nextInt()));
//        stockUser.setUserId("yangjuanying");
//        stockUser.setUserName("杨镌颖");
//        stockUserService.insert(stockUser);
        return "login.vm";
    }
    
    @RequestMapping("/user/save.htm")
    public String saveUser(){
        StockUser stockUser = new StockUser();
        stockUser.setId(String.valueOf(new Random().nextInt()));
        stockUser.setUserId("yangjuanying");
        stockUser.setUserName("杨镌颖");
        stockUserService.insert(stockUser);
        return "login.vm";
    }

}
  